﻿/*
[]
*/

Ext.namespace("tk","tk.yunos","tk.yunos.app");

tk.yunos.app.WallpaperDialog = function(){
	var selectWindow = tk.yunos.system.GLOBAL_WINDOWMGR.newWindow({
		title: tk.yunos.app.WallpaperDialog.appname,
		icon: tk.yunos.filesystem.APP_ICON_DIR + '/wallpaper-changer.png',
		modal: true,
		items: [
			new tk.yunos.system.FileMgr.Panel(null, {
				forSelect: true, 
				selectMimes: ['image'], 
				selectHandler: function(fileMsgr, selectedTofus){
					if(selectedTofus.length() > 0){
						tk.yunos.system.GLOBAL_DESKTOP.setWallpaper(selectedTofus.get(0).getFile().address);
						selectWindow.close();
					}
				},
				address: '/图片'
			})
		]
	});
	selectWindow.show();
};

tk.yunos.app.WallpaperDialog.appname = '修改壁纸';